package com.ftwj.demo.utils.result;

import com.fasterxml.jackson.annotation.JsonFormat;

//@JsonSerialize
//@JsonDeserialize
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MessageEnum {

	SERVER_SUCCESS(0, "操作成功"), 
	SERVER_FAILED(-100, "操作失败"), 
	SERVER_OPERATE_FAILED(-1001, "操作失败：%s"), 
	VALIDATE_FILED_ERROR(-101, "校验失败：%s"),
	MEHOD_AGEUMET_VALIDATE_FILED_ERROR(-1011, "方法参数校验失败：%s"),
	DATA_ACCESS_ERROR(-102,"拒绝访问：%s"),
	AUTHORI_ERROR(-103,"授权失败：您没有权限执行该操作"),
	AUTHENTI_ERROR(-104,"登录失败"),
	AUTHENTI_UNKNOWN_ERROR(-1040,"登录失败：账户不存在或用户名密码错误"),
	AUTHENTI_DISABLED_ERROR(-1041,"登录失败：账户已被禁用，如需帮助请联系管理员"),
	AUTHENTI_LOCKED_ERROR(-1042,"登录失败：%s"),
	CUSTOM_ERROR(-105,"操作异常：%s"),
	NULL_CONTENT(-106,"暂无数据"),
	JSON_PARSE_FILED_ERROR(-107, "JSON解析异常：%s"),
	SMS_SEND_FAILED(-110," 系统短信下发失败！"),
	SQL_CONVER_ERROR(-120,"SQL执行异常：%s"),
	SCHEDULE_ERROR(-130, "调度器异常:%s"),
	SECURITY_ERROR(-140,"安全验证失败：%s"),
	SERVER_ERROR(-200, "系统异常");
	
	
	private final Integer code;
	private final String message;
	
	public Integer getCode() {
		return code;
	}
	public String getMessage() {
		return message;
	}
	
	private MessageEnum(Integer code, String message) {
		this.code = code;
		this.message = message;
	}
	
}
